package com.ruoyi.ipms_patent.service.impl;

//import com.ruoyi.ipms_patent.entity.Inventor;
import com.ruoyi.ipms_patent.mapper.InventorMapper;
import com.ruoyi.ipms_patent.service.InventorService;
import com.ruoyi.system.api.dto.InventorDto;
import com.ruoyi.system.api.entity.Inventor;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/*发明人业务实现类*/
@Service
public class InventorServiceImpl implements InventorService {

    @Resource
    private InventorMapper mapper;

    @Override
    public Inventor addInventor(Inventor inventor) {
        int result = mapper.insertOne(inventor);
        return result > 0 ? inventor : null;
    }

    @Override
    public List<Inventor> findInventorList(Integer patentId) {
        return mapper.selectList(patentId);
    }


    /*全部发明人列表（all）*/
    @Override
    public List<InventorDto> findAllInventor(InventorDto inventorDto) {
        return mapper.findAllInventor(inventorDto);
    }
}
